package com.fxm.controller;

import com.fxm.returns.RespEntity;
import com.fxm.service.RecordService;
import com.fxm.vo.param.RecordParam;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 答题记录 前端控制器
 * </p>
 *
 * @author fxm
 * @since 2021-01-07
 */
@RestController
@RequestMapping("/record")
@Slf4j
@Api(value = "答题记录接口", tags = "答题记录接口")
public class RecordController {

    @Resource
    private RecordService recordService;

    @PostMapping("/insert")
    @ApiOperation(value = "同步用户答题记录")
    public RespEntity insertQuestionAnswer(@RequestBody RecordParam recordParam) {
        RespEntity respEntity = recordService.insertRecordAnswer(recordParam);
        return respEntity;
    }
}
